#案例：发送带请求参数(param)的GET请求
#需求：GET http://www.baidu.com/s?wd=hello&ie=utf-8

import requests

#方法1
# url="http://www.baidu.com/s"
# param=\
# {
#     "wd":"hello",
#     "ie":"utf-8"
# }
# r=requests.get(url=url,params=param)


#方法2
url="http://www.baidu.com"
param="wd=hello&ie=utf-8"
r=requests.get(url=url,params=param)



